package dfbz.work;

public class Test02 {
    public static void main(String[] args) {
        getByte();
        getShort();
    }
    public static void getByte(){
        byte b1=10;
        byte b2=20;
        byte b3=(byte)(b1+b2);
        System.out.println("byte类型的b1和b2的和为:"+b3);
    }
    public static void getShort(){
        short s1=1000;
        short s2=2000;
        short s3=(short)(s1+s2);
        System.out.println("short类型的s1和s2的和为:"+s3);

    }
}
